import 'package:flutter/material.dart';

//基类UI
abstract class BaseMaterialWidget extends StatelessWidget {
  @protected
  String getTitle() {
    return null;
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: getTitle() == null ? "" : getTitle(),
      home: Scaffold(
        appBar: getTitle() == null ? null : AppBar(title: Text(getTitle())),
        body: buildContent(context),
      ),
    );
  }

  @protected
  Widget buildContent(BuildContext context);
}
